<template>
    <div class="app-container">
        <el-table :data="tableData" style="width: 100%" border
        fit
        highlight-current-row
        >
            <el-table-column type="expand">
                <template slot-scope="props">
                    <!--  <el-card class="box-card">
                        <div v-for="o in props.row.values" :key="o.value" class="text item">
                          {{o.value + " :" + o.total }}
                        </div>
                      </el-card> -->

                    <el-table :data="props.row.values" style="width: 100%">
                        <el-table-column prop="value" label="选项"></el-table-column>
                        <el-table-column prop="label" label="含义"></el-table-column>
                        <el-table-column prop="total" label="得分"></el-table-column>
                    </el-table>

                </template>
            </el-table-column>
            <el-table-column label="员工号" prop="sno">
            </el-table-column>
            <el-table-column label="姓名" prop="name">
            </el-table-column>

        </el-table>
    </div>
</template>

<script>
import { studentRecord } from '@/api/question'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
import BackToTop from '@/components/BackToTop'
export default {
    name: 'SubjectTable',
    components: { Pagination, BackToTop },
    directives: { waves },
    data() {
        return {
            tableData: []
        }
    },
    created() {
        this.getList()
    },
    methods: {
        async getList() {
            const result = await studentRecord('')
            if (result.statu === 0) {
                this.tableData = result.data
                console.log('getList', this.tableData)

            }
        }
    }
}

</script>

<style rel="stylesheet/scss" lang="scss" type="text/scss" scoped></style>